﻿using MvvmFoundation.Wpf;
using PublicTalks.TalkModule;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Input;

namespace PublicTalks
{
    public class MainWindowViewModel : ObservableObject
    {
        public ObservableCollection<CommandViewModel> NavigationCommands { get; private set; }

        ViewModel _mainPanel;

        public ViewModel MainPanel
        {
            get { return _mainPanel; }
            private set
            {
                _mainPanel = value;
                RaisePropertyChanged("MainPanel");
            }
        }

        public MainWindowViewModel()
        {
            NavigationCommands = new ObservableCollection<CommandViewModel>
            {
                new CommandViewModel(ShowTalks) { DisplayName = "Talks"}
            };
        }

        private void ShowTalks()
        {
            MainPanel = new TalksViewModel();
        } 
    } 
}
